
#include <cassert>
#include <iostream>

using namespace std;

class PureVirtualA {

public:
  virtual ~PureVirtualA();

  virtual void testPureVirtualFunc() = 0;

protected:
  void publicFunc();
};

PureVirtualA::~PureVirtualA()

{}

void PureVirtualA::publicFunc()

{

  std::cout << "PureVirtualA::publicFunc()" << std::endl;
}

void PureVirtualA::testPureVirtualFunc() {

  std::cout << "PureVirtualA::testPureVirtualFunc()" << std::endl;
}

class TestB : public PureVirtualA {

public:
  void testPureVirtualFunc();
};

void TestB::testPureVirtualFunc() {

  PureVirtualA::testPureVirtualFunc();

  std::cout << "B::testPureVirtualFunc()" << std::endl;

  this->publicFunc();
}

int main() {
  PureVirtualA *test = new TestB;
  test->testPureVirtualFunc();

  test->PureVirtualA::testPureVirtualFunc();
  return 0;
}